package wp.ggt.com.wpview.activity;

import android.os.Bundle;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

import wp.ggt.com.wpview.R;
import wp.ggt.com.wpview.adapter.CommendAdapter;
import wp.ggt.com.wpview.adapter.ViewHolder;

public class MyViewGroupActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_view_group);
        ListView listView = (ListView) findViewById(R.id.lv_frendcircle);
        List<String> datas = new ArrayList<>();
        for (int i = 0; i < 5; i++) {
            datas.add("http://www.guigutang.com/img/article_photo/3816476652/48fbab00052197bc8bd943498b89dd71_1.jpg");
        }
        CommendAdapter adapter = new CommendAdapter<String>(this, R.layout.lv_item, datas) {

            @Override
            public void setItemData(ViewHolder holder, String data) {
                holder.setPhoto(data, R.id.lv_item_group, 3);
            }
        };
        listView.setAdapter(adapter);
    }


}
